﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Practices.Prism.Logging;
using System.Diagnostics;

namespace Gwn.Prism4.UnityExtensions
{
    /// <summary>
    /// Default logger uses Debug.Writeline()
    /// </summary>
    public class DefaultLogger : ILoggerFacade
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="DefaultLogger"/> class.
        /// </summary>
        public DefaultLogger()
        {
        }

        /// <summary>
        /// Write a new log entry with the specified category and priority.
        /// </summary>
        /// <param name="message">Message body to log.</param>
        /// <param name="category">Category of the entry.</param>
        /// <param name="priority">The priority of the entry.</param>
        public void Log(string message, Category category, Priority priority)
        {
            Debug.WriteLine(string.Format("{0}({1}) : {2}", category, priority, message));
        }
    }
}
